package com.cci.kangdao.dao;

import java.util.Map;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.mybatis.spring.annotation.MapperScan;

@MapperScan
public interface ActivityDao {

	@Insert("INSERT INTO InstallRecord_T ([UserPhone],[UserName],[CarNo],[ChassisNo],[ESN],[RegistDate],[OwnerName],[OwnerPhone],[TotalMiles])\r\n" + 
			"     VALUES ( #{userPhone}, #{userName}, #{carNo}, #{chassisNo}, #{ESN}, #{registDate}, #{ownerName}, #{ownerPhone}, #{totalMiles})")
	@Options(useGeneratedKeys = true, keyProperty = "RecordId")
	int addRecord(Map<String, Object> map);
	
	@Insert("INSERT INTO InstallRecordPicture_T (RecordId ,PicLink ,Remark)\r\n" + 
			"     VALUES (#{RecordId} ,#{PicLink} ,#{Remark})")
	int addPicture(Map<String, Object> map);
}
